@import 'common';
@baseFont: 50;

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: #757575;
}

ul {
    padding: 0;
    margin: 0;
}

ul li {
    list-style: none;
}

input {
    border: 0;
    outline: none;
}

body {
    min-width: 320px;
    width: 15rem;
    margin: 0 auto;
    line-height: 1.5;
    font-family: Arial, Helvetica;
    background: #F2F2F2;
}

// 搜索部分
header {
    width: 15rem;
    height: 88rem / @baseFont;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;

    .flex-box {
        position: fixed;
        display: flex;
        width: 15rem;
        z-index: 999;
        background-color: #A60000;
    }

    .flex-box a {
        width: 36rem / @baseFont;
        height: 60rem / @baseFont;
        margin: 14rem / @baseFont 45rem / @baseFont 15rem / @baseFont 35rem / @baseFont;
    }

    .flex-box a:nth-child(1) {
        background: url('../images/header_cart.png') no-repeat center;
        background-size: 36rem / @baseFont 60rem / @baseFont;
    }

    .flex-box a:nth-child(3) {
        background: url('../images/header_login.png') no-repeat center;
        background-size: 36rem / @baseFont 60rem / @baseFont;
    }

    .search-input {
        flex: 1;
        position: relative;
        width: 100%;
        line-height: 44rem / @baseFont;
        border-radius: 30rem / @baseFont;
        margin: 15rem / @baseFont auto 10rem / @baseFont;
        overflow: hidden;

        span {
            position: absolute;
            top: 15rem / @baseFont;
            left: 20rem / @baseFont;
            width: 36rem / @baseFont;
            height: 36rem / @baseFont;
            background: url('../images/search1.png') no-repeat center;
            background-size: 36rem / @baseFont 36rem / @baseFont;
        }

        input {
            width: 100%;
            height: 65rem / @baseFont;
            background-color: #fff;
            padding-left: 68rem / @baseFont;
            color: #757575;
            font-size: 18rem / @baseFont;
        }
    }

    .swipper {
        width: 100%;
        height: 230rem / @baseFont;
        border-radius: 20rem / @baseFont;
        overflow: hidden;
        margin: 10rem / @baseFont 25rem / @baseFont;
        background-color: #A60000;
        margin-top: 100rem / @baseFont;

        img {
            width: 100%;
            height: 100%;
        }
    }
}

.middle-linear {
    width: 100%;
    height: auto;

    .gif-img {
        width: 100%;
        height: 160rem / @baseFont;

        img {
            width: 100%;
            height: 100%;
        }
    }

    .nav-three-img {
        height: 165rem / @baseFont;
        display: flex;
        justify-content: space-around;

        div {
            width: 250rem / @baseFont;
            height: 170rem / @baseFont;
        }

        div:nth-child(1) {
            background: url('../images/sub-img1.webp') no-repeat center;
            background-size: 250rem / @baseFont 170rem / @baseFont;
        }

        div:nth-child(2) {
            background: url('../images/sub-img2.webp') no-repeat center;
            background-size: 250rem / @baseFont 170rem / @baseFont;
        }

        div:nth-child(3) {
            background: url('../images/sub-img3.webp') no-repeat center;
            background-size: 250rem / @baseFont 170rem / @baseFont;
        }
    }
}

// 导航部分
.nav-tab {
    width: 100%;
    background-color: #F4F4F4;

    .nav-items {
        display: flex;
        justify-content: space-around;
        flex-wrap: wrap;
        padding: 35rem / @baseFont 0;

        a:nth-child(-n+5) {
            margin-bottom: 25rem / @baseFont;
        }

        .items {
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 150rem / @baseFont;

            img {
                width: 84rem / @baseFont;
                height: 84rem / @baseFont;
            }

            p {
                color: #757575;
                font-size: 18rem / @baseFont;
            }
        }
    }
}

// 秒杀部分
.news-tab {
    display: flex;
    justify-content: space-around;
    width: 100%;
    height: 235rem / @baseFont;

    a {
        display: block;
        height: 100%;
    }

    a:nth-child(1) {
        flex: 2;
    }

    a:nth-child(2) {
        flex: 1;
    }

    a:nth-child(3) {
        flex: 1;
    }

    a div {
        height: 100%;
    }

    a:nth-child(1) div {
        background-color: red;
        background: url('../images/news-img1.png') no-repeat center;
        background-size: 373rem / @baseFont 234rem / @baseFont;
    }

    a:nth-child(2) div {
        flex: 1;
        background-color: green;
        background: url('../images/news-img2.gif') no-repeat center;
        background-size: 188rem / @baseFont 234rem / @baseFont;
    }

    a:nth-child(3) div {
        flex: 1;
        background-color: blue;
        background: url('../images/news-img3.gif') no-repeat center;
        background-size: 186rem / @baseFont 234rem / @baseFont;
    }
}

// 推荐部分
.recommend {
    width: 93%;
    margin: 20rem / @baseFont 26rem / @baseFont 10rem / @baseFont;
    background-color: #fff;
    border-radius: 15rem / @baseFont;

    .recom-top {
        display: flex;

        .border-right {
            border-right: 1rem / @baseFont solid #ececec;
        }

        .top-items {
            flex: 1;

            h3 {
                margin: 20rem / @baseFont 0 0 25rem / @baseFont;
                font-size: 24rem / @baseFont;
            }

            p {
                color: #999BB3;
                margin: 0 0 0 25rem / @baseFont;
                font-size: 20rem / @baseFont;
            }

            .top-img {
                display: flex;
                justify-content: space-around;
                margin-top: 10rem / @baseFont;

                div {
                    position: relative;
                    display: flex;
                    flex-direction: column;
                    align-items: center;

                    img {
                        width: 120rem / @baseFont;
                        height: 120rem / @baseFont;
                    }

                    p {
                        color: #FF554A;
                        margin: 10rem / @baseFont 0 0 0;
                        font-size: 20rem / @baseFont;
                    }

                    span {
                        position: absolute;
                        bottom: -40rem / @baseFont;
                        width: 150rem / @baseFont;
                        height: 54rem / @baseFont;
                        line-height: 80rem / @baseFont;
                        font-size: .4rem;
                        color: #333;
                        text-align: center;
                        background: url('../images/img-bg.png') no-repeat center;
                        background-size: 150rem / @baseFont 54rem / @baseFont;
                    }
                }
            }
        }
    }

    .recom-bottom {
        display: flex;
        width: 696rem / @baseFont;
        height: 172rem / @baseFont;
        margin: 0 auto;
        border-top: 1rem / @baseFont solid #cccccc;
        margin-top: 10rem / @baseFont;

        .left-tilte {
            margin: 50rem / @baseFont 20rem / @baseFont 0;

            a {
                h2 {
                    color: #333333;
                    font-size: 25rem / @baseFont;
                }

                p {
                    color: #9FA19F;
                    font-size: 23rem / @baseFont;
                }
            }
        }

        .four-space {
            display: flex;
            flex: 1;
            justify-content: space-around;

            div {
                height: 172rem / @baseFont;
                padding-top: 25rem / @baseFont;

                a {
                    display: flex;
                    flex-direction: column;
                    align-items: center;

                    img {
                        width: 100rem / @baseFont;
                        height: 100rem / @baseFont;
                    }

                    span {
                        margin-top: 10rem / @baseFont;
                        color: #333333;
                        font-size: 20rem / @baseFont;
                    }
                }

            }
        }
    }
}

footer {
    width: 15rem;
    height: 101rem / @baseFont;
    position: relative;

    // 底部导航
    .nav-bottom {
        width: 15rem;
        height: 101rem / @baseFont;
        position: fixed;
        bottom: 0;
        background-color: #fff;

        ul {
            width: 100%;
        }

        ul li {
            float: left;
            width: 20%;
            height: 100%;

            a {
                display: inline-block;
                width: 100%;
                height: 100%;

                img {
                    display: block;
                    width: 48rem / @baseFont;
                    height: 48rem / @baseFont;
                    margin: 12rem / @baseFont 51rem / @baseFont 0;
                }

                p {
                    text-align: center;
                    color: #757575;
                    font-size: 18rem / @baseFont;
                }
            }
        }
    }
}